<include file="public@head" />
</head>

<body>
    <div class="layui-fluid wrap js-check-wrap" id="component-tabs">
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header">页面管理</div>
                    <div class="layui-card-body">
                        <div class="layui-tab">
                            <ul class="layui-tab-title">
                                <li class="layui-this"><a href="{:url('AdminPage/index')}">所有页面</a></li>
                                <li><a href="{:url('AdminPage/add')}">添加页面</a></li>
                            </ul>
                            <div class="layui-tab-content">
                                <div class="layui-tab-item layui-show">
                                    <form class="well form-inline margin-top-20" method="post" action="{:url('AdminCategory/index')}">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">标题:</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="keyword" placeholder="请输入关键字" class="layui-input" value="{$keyword|default=''}">
                                            </div>
                                            <input type="submit" class="layui-btn layui-btn-normal" value="搜索" />
                                            <a class="layui-btn layui-btn-danger" href="{:url('AdminPage/index')}">清空</a>
                                        </div>
                                    </form>
                                    <form method="post" class="js-ajax-form layui-form" action="{:url('AdminPage/listOrder')}">
                                        <div class="layui-btn-group">
                                            <button class="layui-btn layui-btn-danger layui-btn-sm js-ajax-submit" type="submit" data-action="{:url('AdminPage/delete')}" data-subcheck="true" data-msg="你确定删除吗？">{:lang('DELETE')}
                                            </button>
                                        </div>
                                        <table class="layui-table" id="menus-table">
                                            <thead>
                                                <tr>
                                                    <th width="16">
                                                        <input lay-skin="primary" type="checkbox" lay-filter="js-check-all" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                                                    </th>
                                                    <th width="100">ID</th>
                                                    <th>标题</th>
                                                    <th width="80">作者</th>
                                                    <th width="160">发布时间</th>
                                                    <th width="80">状态</th>
                                                    <th width="160">操作</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <php>$status=array("1"=>'已发布',"0"=>'未发布');</php>
                                                <foreach name="pages" item="vo">
                                                    <tr>
                                                        <td>
                                                            <input lay-skin="primary" type="checkbox" lay-filter="js-check" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}">
                                                        </td>
                                                        <td>{$vo.id}</td>
                                                        <td>
                                                            <a href="{:url('portal/page/index',array('id'=>$vo['id']))}" target="_blank">
                                                                {$vo.post_title}
                                                            </a>
                                                        </td>
                                                        <td>{$vo.user_nickname}</td>
                                                        <td>
                                                            <empty name="vo.published_time">
                                                                未发布
                                                                <else />
                                                                {:date('Y-m-d H:i',$vo['published_time'])}
                                                            </empty>
                                                        </td>
                                                        <td>
                                                            <notempty name="vo.post_status">
                                                                <a data-toggle="tooltip" title="已发布"><i class="fa fa-check"></i></a>
                                                                <else />
                                                                <a data-toggle="tooltip" title="未发布"><i class="fa fa-close"></i></a>
                                                            </notempty>
                                                        </td>
                                                        <td>
                                                            <span class="layui-btn-group">
                                                                <a class="layui-btn layui-btn-xs layui-btn-normal" href="{:url('AdminPage/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
                                                                <a class="layui-btn layui-btn-xs layui-btn-danger" href="{:url('AdminPage/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
                                                            </span>
                                                        </td>
                                                    </tr>
                                                </foreach>
                                            </tbody>
                                            <thead>
                                                <tr>
                                                    <th width="16">
                                                        <input lay-skin="primary" type="checkbox" lay-filter="js-check-all" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                                                    </th>
                                                    <th width="100">ID</th>
                                                    <th>标题</th>
                                                    <th width="80">作者</th>
                                                    <th width="160">发布时间</th>
                                                    <th width="80">状态</th>
                                                    <th width="160">操作</th>
                                                </tr>
                                            </thead>
                                        </table>
                                        <div class="layui-btn-group">
                                            <button class="layui-btn layui-btn-danger layui-btn-sm js-ajax-submit" type="submit" data-action="{:url('AdminPage/delete')}" data-subcheck="true" data-msg="你确定删除吗？">{:lang('DELETE')}
                                            </button>
                                        </div>
                                    </form>
                                    <div class="layui-laypage">{$page|default=''}</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <include file="public@footer" />
</body>

</html>